// 当前这个模块的作用：对所有的API接口进行统一的管理
import request from "@/api/request";

/* 房间信息 */
export const reqAddRoom = (params)=> request({url:'/addRoom', method:'post', params});                          //新建房间
export const reqGetRoomLIstData = ()=> request({url:'/getRoomListData', method:'get'});                         //获取房间列表
export const reqModifyRoomConfig = (params)=> request({url:'/modifyRoomConfig', method:'put', params});         //修改房间配置
export const reqDeleteRoom = (params)=> request({url:'/deleteRoom', method:'delete', params});                  //删除房间

/* 房间类型 */
export const reqAddRoomType = (params)=> request({url:'/addRoomType', method:'post', params});                      //新建房间类型
export const reqGetRoomTypeListData = ()=> request({url:'/getRoomTypeListData', method:'get'});                     //获取房间类型列表
export const reqModifyRoomTypeConfig = (params)=> request({url:'/modifyRoomTypeConfig', method:'put', params});     //修改房间类型配置
export const reqDeleteRoomType = (params)=> request({url:'/deleteRoomType', method:'delete', params});              //删除房间类型

/* 用户信息 */
export const reqGetUserList = ()=> request({url:'/getUserList', method:'get'});                         //获取用户列表['用户名','用户ID']
export const reqGetUserListInfo = (params)=> request({url:'/getUserInfoList', method:'post', params});  // 根据用户id列表获取用户信息列表

/* 房间管理roomManger */
export const reqOpenRoom = (params)=> request({url:'/openRoom', method:'post', params});                        // 创建订单（开房）
export const reqGetAllStateZeroOrderList = ()=> request({url:'/getAllStateZeroOrderList', method:'get'});       // 创建订单（开房）
export const reqCloseRoom = (params)=> request({url:'/closeRoom', method:'put', params});                       // 修改订单、房间（退房）
export const reqChangeRoom = (params)=> request({url:'/changeRoom', method:'put', params});                     // 修改订单、房间信息（换房）


/* 订单信息 */
export const reqGetOrderInfo = (params)=> request({url:'/getOrderInfo', method:'post', params});        // 根据orderId获取订单信息
export const reqGetOrderListByUserId = (params)=> request({url:'/getOrderListByUserId', method:'post', params});   // 根据userId获取订单信息
export const reqGetOnlineOrderList = (params)=> request({url:'/getOnlineOrderList', method:'get', params});   // 所以线上待分配获取订单